package org.example.bean;

import org.apache.dubbo.config.annotation.Reference;
import org.example.service.HelloService;
import org.springframework.stereotype.Component;

@Component
public class ConsumerComponent {

    @Reference
    private HelloService helloService;
    @Reference
    private HelloService service;

    public String sayHello(String name) {
        String s1 = service.sayHello(name);
        String s = helloService.sayHello(name);
        return s1 + "\n" + s;
    }
}
